package com.zzl.finance.order.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.finance.order.dto.OrderPageDto;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

/**
 * @author sunpp
 * @date 2022-03-07 10:41:16
 */
@Data
@TableName("o_order_invoice")
@ApidocModel
@SuppressWarnings("javadoc")
public class OrderInvoiceEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    @ApidocModelProperty(description = "主键")
    private String id;
    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "发票金额")
    private Double invoiceAmount;
    @ApidocModelProperty(description = "发票种类 1普通增值税发票 2. 专用增值税发票")
    private Integer invoiceCategory;
    @ApidocModelProperty(description = "发票类型 1.电子发票  2 纸质发票")
    private Integer invoiceType;
    @ApidocModelProperty(description = "发票状态")
    private Integer invoiceStatus;

    @ApidocModelProperty(description = "电子邮箱")
    private String email;


    @ApidocModelProperty(description = "抬头")
    private String rise;
    @ApidocModelProperty(description = "税号")
    private String dutyParagraph;
    @ApidocModelProperty(description = "开户银行")
    private String depositBank;
    @ApidocModelProperty(description = "开户账号")
    private String accountNo;
    @ApidocModelProperty(description = "注册固定电话")
    private String registerLandline;
    @ApidocModelProperty(description = "注册场所地址")
    private String registerAddress;


    @ApidocModelProperty(description = "收件人")
    private String addressee;
    @ApidocModelProperty(description = "联系电话")
    private String telephone;
    @ApidocModelProperty(description = "详细地址")
    private String detailAddress;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "更新时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "创建时间", validate = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApidocModelProperty(description = "创建人id")
    private Integer creatorId;
    @ApidocModelProperty(description = "创建人姓名")
    private String creatorUserName;
    @ApidocModelProperty(description = "更新人id")
    private Integer updaterId;
    @ApidocModelProperty(description = "备注")
    private String remark;

    @ApidocModelProperty(description = "企业id")
    private String enterpriseId;
    @ApidocModelProperty(description = "组织机构id 控制数据权限")
    private Integer orgId;
    @ApidocModelProperty(description = "1 表示删除，0 表示未删除")
    @TableField(value = "is_deleted", fill = FieldFill.INSERT)
    @TableLogic(value = "0", delval = "1")
    private Integer isDeleted;

    @ApidocModelProperty(description = "上链地址")
    private String uplinkAddress;

    @TableField(exist = false)
    @ApidocModelProperty(description = "发票种类 普通增值税发票 2. 专用增值税发票 字符串")
    private String invoiceCategoryStr;

    @TableField(exist = false)
    @ApidocModelProperty(description = "发票类型 1.电子发票  2 纸质发票 字符串")
    private String invoiceTypeStr;

    @TableField(exist = false)
    @ApidocModelProperty(description = "发票状态 字符串")
    private String invoiceStatusStr;

    @TableField(exist = false)
    @ApidocModelProperty(description = "订单信息")
    List<OrderPageDto> orderPageDtos;
}
